﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

namespace LotteCinema.DAO
{
    public class DQuanLyVe:KetNoiCSDL
    {
        public DataTable VE_LietKe()
        {
            using (SqlCommand cmd = new SqlCommand("sp_LIETKEVE_VE", LayKetNoi()))
            {
                cmd.CommandType = CommandType.StoredProcedure;
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                DataTable dt = new DataTable();
                da.Fill(dt);
                return dt;
            }
        }
        public DataTable VE_LietKeTheoNgay(string ngay)
        {
            using (SqlCommand cmd = new SqlCommand("sp_LIETKEVETHEONGAY_VE", LayKetNoi()))
            {
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add(new SqlParameter("@ngay", SqlDbType.Date)).Value = ngay;
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                DataTable dt = new DataTable();
                da.Fill(dt);
                return dt;
            }
        }
    }
  
}